﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace _5___RealNumbers
{
    class Program
    {
        static void Validate(string text)
        {
            string pattern = @"\A-?(0|[1-9][0-9]*)(\.[0-9]+)?\Z";
            bool result = Regex.IsMatch(text, pattern);
            Console.Write("{0} - ", text);
            Console.WriteLine(result);            
        }

        static void Main(string[] args)
        {
            string text = "0";
            Validate(text);
            text = "-0";
            Validate(text);
            text = "2";
            Validate(text);
            text = "-34";
            Validate(text);
            text = "1.56";
            Validate(text);
            text = "-1.85";
            Validate(text);
            text = "10.00";
            Validate(text);
            text = "-1.00";
            Validate(text);
            text = "+5";
            Validate(text);
            text = "0 34";
            Validate(text);
            text = "3 34";
            Validate(text);
            text = "02.34";
            Validate(text);
            text = "0.";
            Validate(text);
            text = ".34";
            Validate(text);
            text = "-.34";
            Validate(text);
            text = "0 34";
            Validate(text);
        }
    }
}
